import { Controller, UseFilters, UseInterceptors, UsePipes, ValidationPipe, UseGuards } from '@nestjs/common';
import { ApiTags, ApiBearerAuth } from '@nestjs/swagger';
import { Crud, CrudController } from '@nestjsx/crud';
import { Resources } from 'libs/db/entity/resources.entity';
import { HttpExceptionFilter } from '../_filter/http-exception.filter';
import { LoggingInterceptor } from '../_interceptor/logging.interceptor';
import { ResourcesCrudOps } from './resources-crud-ops';
import { ResourcesService } from './resources.service';
import { AuthGuard } from '@nestjs/passport';


@Crud(ResourcesCrudOps)
@UseFilters(HttpExceptionFilter)
@UsePipes(ValidationPipe)
@UseInterceptors(LoggingInterceptor)
@UseGuards(AuthGuard('jwt-web'))
@ApiBearerAuth()
@ApiTags('三资管理 - 资源信息')   //标签
@Controller('resources')
export class ResourcesController implements CrudController<Resources> {
  constructor(public service: ResourcesService) {
  }
}
